﻿@model ProgrammersFAQ.Models.SolutionModels
<!DOCTYPE html>

<html>
<head>
    <style type="text/css">
    label {
        width: 100px;
        float: left;
        
    }    
    </style>
    <script type="text/javascript" src="~/Scripts/jquery-1.6.2.js"></script>
    <script type="text/ecmascript">
        window.onload = function () {
            $.get('/PlatformService/getPlatformCombo', function (data) {
                document.getElementById('platforms').innerHTML = data;
            });

            $("#platforms").change(function () {                
                var platformID = $("#platforms").val();
                var url = '/ProductService/getProductComboBySelectedPlatform?id=' + platformID;
                $.get(url, function (data) {
                    document.getElementById('products').innerHTML = data;
                });
            });

        }
    </script>
    <meta name="viewport" content="width=device-width" />
    <title></title>
</head>
<body>
    <div>
        <form method="post" action="~/Solution/Index">           
            <label for="select_platform">Platform:</label>                
            <select name="select_platform" id="platforms">
                <option value="-1">Selecione</option>
            </select> <br />
            <label for="productName">Product:</label>
            <select name="productName" id="products">
                <option value="-1">Selecione</option>
            </select> <br />
            <label for="error">Error:</label>
            <input type="text" name="error" maxlength="250" size="50"/><br />
            <label for="externalLink">External Link:</label>
            <input type="text" name="externalLink" size="50"/><br />
            <label for="errorDescription">Error Description:</label>
            <textarea cols="50" rows="10" name="errorDescription">

            </textarea><br />
            <label for="solution">Solution If Available:</label>
            <textarea cols="50" rows="10" name="solution">

            </textarea><br />
            <input type="submit" value="submit" />
            
        </form>
    </div>
</body>
</html>
